<?

$fs_ord_man_payments = new Fieldset (array (
	db_conn=>$_GLOBAL_DBH,
	relation=>"ord_man_payments",
	title=>"Order Payments",
	fieldset=>array (
		array (name=>"id",label=>"ID",type=>"numeric",
				value=>$_REQUEST["payment_id"],
				input=>"hidden",primary_key=>true),
		array (name=>"order_id",label=>"Order",type=>"any",
				relation=>array(foreign=>"ord_man_orders",key=>"id",
				field=>"name"),
				input=>"select",
				options=>"_app_select_query",
				options_params=>"SELECT id,name FROM ord_man_orders",
				columns=>array (key=>"id",value=>"name"),
		),
		array (name=>"amount",label=>"Amount",type=>"decimal",
				input=>"field", optional=>true),
		array (name=>"payment_date",label=>"Payment Date",type=>"any",
				input=>"date",value=>_app_date("payment_date")),
		array (name=>"cc_name",label=>"Card Name",type=>"any",
				input=>"field", optional=>true),
		array (name=>"cc_no",label=>"Card Number",type=>"any",
				input=>"field", optional=>true),
		array (name=>"cc_exp",label=>"Expiration Date",type=>"any",
				input=>"date",value=>_app_date("cc_exp")),
		array (name=>"payment-method_id",label=>"Payment Method",type=>"any",
				relation=>array(foreign=>"ord_man_payment_methods",key=>"id",
				field=>"name"),
				input=>"select",
				options=>"_app_select_query",
				options_params=>"SELECT id,name FROM ord_man_payment_methods",
				columns=>array (key=>"id",value=>"name"),
		),
	),
));

$fs_ord_man_payments->parse ();

?>
